﻿#region Copyright Statement
//////////////////////////////////////////////
//                                          //
//      Created By:   Ali Ghomi             //
//      Date:         21 Jan 2010           //
//////////////////////////////////////////////
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ORMAC.Attributes
{
    /// <summary>
    /// Attribute class for mapping class properties to xml elements (dataset table fields)
    /// </summary>
    [AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
    public class FieldAttribute:BaseAttribute
    {

        private string m_FieldName;
        /// <summary>
        /// Field's column name
        /// </summary>
        public string FieldName
        {
            get
            {
                return m_FieldName;
            }
        }
        private string m_Default;
        /// <summary>
        /// Field's column name
        /// </summary>
        public string Default
        {
            get
            {
                return m_Default;
            }
        }

        private bool m_usePrefix;
        public bool UsePrefix
        {
            get
            {
                return m_usePrefix;
            }
            set
            {
                m_usePrefix = value;
            }
        }

        public FieldAttribute(string schema, string fieldName)
        {
            m_Schema = schema;
            m_FieldName = fieldName;
        }
        public FieldAttribute(string fieldName):this("",fieldName)
        {
        }

    }
}
